using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.VisualStudio.TestTools.UnitTesting;

using ShopPowerTemplate.IoC;
using ShopPowerTemplate.Entities;
using ShopPowerTemplate.Services.Tests.Properties;

namespace ShopPowerTemplate.Services.Tests
{
    public partial class ProductDetailServiceUtil
    {
	
		static internal IProductDetailService CreateProductDetailService()
        {
            IProductDetailService target = IoCFactory.Resolve<IProductDetailService>();
            return target;
        }
				#region ProductDetail Test
 
        

		public static ProductDetail CreateProductDetail()
        {
            ProductDetail result = GetProductDetail();
            IProductDetailService service = CreateProductDetailService();
			service.Add(result);

			result = service.Find(result.Id);
            return result;
        }
		
		public static ProductDetail CreateProductDetailFull()
        {
            ProductDetail result = GetProductDetailFull();
            IProductDetailService service = CreateProductDetailService();
			service.Add(result);

			result = service.Find(result.Id);
            return result;
        }
				
        public static ProductDetail GetProductDetail()
        {
            ProductDetail result = new ProductDetail();
			
            result.Stock = 1;


        	result.Product = ProductServiceUtil.CreateProduct(); 
 
            return result;
            
        }
		
        public static ProductDetail GetProductDetailFull()
        {
            ProductDetail result = GetProductDetail();
             
            return result;
            
        }
		
		#endregion ProductDetail Test
	

	}
}
